package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.domain.e3sp.maindata.SparePartBaseView;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Description: 支给件
 * @ClassName: com.xframe.domain.e3sp.basedata.SupParts
 * @Author: lmx
 * @CreateTime: 2024/01/04
 **/
@Data
@Accessors(chain=true)
@XTable(value = "p_t02_sup_parts", label = "支给件")
@XSelectItem(keyName = "supPartId",codeName = "supPartCode",textName = "supPartName")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.maindata.SparePartBaseView",foreignKey = "sparePartId", targetKey = "sparePartId",as = "refSparePartBaseView")
@XHasMany(typeName = "com.xframe.domain.e3sp.basedata.SupPartsD",foreignKey = "supPartId", targetKey = "supPartId",as = "supPartDList")
public class SupParts extends BaseModel {
    /**
     * 支给件ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(primaryKeyFlag = true,desc = "支给件ID")
    private Long supPartId;

    /**
     * 总成件号
     */
    @XQueryCondition
    @XColumn(uniqueFlag = true,desc = "总成件号",length = 100)
    @XGridTableRef
    private String supPartCode;

    /**
     * 总成件号
     */
    @XQueryCondition
    @XColumn(desc = "总成件名称",length = 200,nullFlag = true)
    @XGridTableRef
    private String supPartName;

    /**
     * 加工说明
     */
    @XColumn(desc = "加工说明",length = 500,nullFlag = true)
    private String supSummary;

    /**
     * 备件清单ID
     */
    @XQueryCondition
    @XColumn(name = "spare_part_id", desc = "备件清单ID")
    private Long sparePartId;

    private SparePartBaseView refSparePartBaseView;


    private List<SupPartsD> supPartDList;

}
